﻿@model smartcrm.Models.OrderList

<script src="../../Scripts/unapprovedorder.js"></script>

<div class="list">
<table id="tOrder">
<thead>
<tr>
<th style="width:100px">订单编号</th>
<th style="width:80px">创建日期</th>
<th>客户</th>
<th>订单名称</th>
<th style="width:70px">订单金额</th>
<th style="width:70px">加工费用</th> 
<th style="width:100px">操作</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Orders)
        {
            <tr id="@item.OrderNo">
                <td>@Html.DisplayFor(modelItem => item.OrderNo)</td>
                <td>@item.CreatedTime.ToString("yyyy-MM-dd")</td>
                <td>@Html.DisplayFor(modelItem => item.CustomerShortName)</td>
                <td>@Html.DisplayFor(modelItem => item.OrderName)</td>               
                <td>@Html.DisplayFor(modelItem => item.Amount)</td>          
                <td>@Html.DisplayFor(modelItem => item.FactoryAmount)</td>              
                <td>
                    <img src="../../Images/grid/edit.png" title="编辑" onclick="javascript:EditOrder('@item.OrderNo')" />  
                    <img src="../../Images/grid/delete.png" title="删除" onclick="javascript:DeleteOrder('@item.OrderNo')" />  
                    <img src="../../Images/grid/detail.png" title="详细" onclick="javascript:ShowDetail('@item.OrderNo')" />   
                    <img src="../../Images/grid/check.png" title="通过审核" onclick="javascript:Approve('@item.OrderNo')" />                   
                </td>
            </tr>
        }   
</tbody>
</table>
</div>

<div id="divDetail" title="订单详细信息" style="display:none">
    <div id="divDetailContent" class="list" style="overflow-y: auto; height: 350px;">    
    
        <div style="display:inline; float:left; margin-bottom:5px;"><span class="OrderStatus">订单状态：</span><span class="OrderStatus" id="dStatus"></span></div>                        
        <table class="tableEdit">
            <tr>
                <td class="label">订单编号</td>
                <td id="dOrderNo"></td>
                <td class="label">订单名称</td>                
                <td id="dOrderName"></td>
            </tr>
            <tr>
                <td class="label">客户</td>
                <td id="dCustomer"></td>
                <td class="label">联系人</td>                
                <td id="dContact"></td>
            </tr>
            <tr>
                <td class="label">数量</td>
                <td id="dNumber"></td>
                <td class="label">预计完工</td>
                <td id="dExpectDeliveryDate"></td>                
            </tr>
            <tr>
                <td class="label">订单金额</td>
                <td id="dAmount"></td>
                <td class="label">已支付金额：</td>
                <td id="dPaid"></td>
            </tr>
            <tr>
                <td class="label">加工费</td>
                <td id="dFactoryAmount"></td>
                <td class="label">交易日期</td>
                <td id="dTransactionDate"></td>                
            </tr>
            <tr>
                <td class="label">创建者</td>
                <td id="dCreator"></td>
                <td class="label">创建时间</td>
                <td id="dCreatedTime"></td>
            </tr>
            <tr>
                <td class="label">备注</td>
                <td colspan="3" id="dMemo"></td>                
            </tr>
            <tr>
                <td class="label">自助查询URL</td>
                <td colspan="3" id="dQueryURL"></td>                
            </tr>
            <tr >
                <td class="label">明细</td>
                <td colspan="3" id="dDetail"></td>                
            </tr>
           
            <tr>
                <td class="label">附件</td>
                <td colspan="3" id='tdAttachment'>
                </td>
            </tr>
                 
        </table>

    </div>
    <div style="text-align:right;">      
       
       <input type="button" onclick="javascript:$('#divDetail').dialog('close');" value="关闭" />    
    </div>  
</div>
